<include file="Login:header" />

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <a href="{:U('training/index')}" class="on"><em>培训资料列表</em></a><span>|</span>
        <a href="{:U('training/add')}" class=""><em>添加培训资料</em></a>
    </div>
</div>

<div class="pad_lr_10" >
    <form name="searchform" method="get" >
        <table width="100%" cellspacing="0" class="search_form">
            <tbody>
                <tr>
                    <td>
                        <div class="explain_col">
                            标题 :
                            <input name="title" type="text" class="input-text" size="25" value="{$search.title}" />
                            <input type="submit" name="search" class="btn" value="搜索" />
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>

    <div class="J_tablelist table_list" data-acturi="{:U('training/ajax_edit')}">
        <table width="100%" cellspacing="0">
            <thead>
                <tr>
                    <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                    <th width=60><span data-tdtype="order_by" data-field="id">ID</span></th>
                    <th align="left">标题</th>
                    <th width=60><span data-tdtype="order_by" data-field="hits">点击量</span></th>
                    <th width=150>作者</th>
                    <th width="40"><span data-tdtype="order_by" data-field="status">状态</span></th>
                    <th width=150><span data-tdtype="order_by" data-field="create_time">创建时间</span></th>
                    <th width="170">操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="list" id="val" >
                <tr>
                    <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                    <td align="center">{$val.id}</td>
                    <td align="left">
                        <span data-tdtype="edit" data-field="title" data-id="{$val.id}" class="tdedit">{$val.title}</span>
                    </td>
                    <td align="center"><b>{$val['hits']}</b></td>
                    <td align="center"><b>{$all_user[$val['user_id']]['user_name']}</b></td>
                    <td align="center">
                        <img data-tdtype="toggle" data-id="{$val.id}" data-field="status" data-value="{$val.status}" src="__ROOT__/static/images/admin/toggle_<if condition="$val.status eq 1">enabled<else/>disabled</if>.gif" />
                    </td>
                    <td align="center">{:date('Y-m-d H:i:s',$val['create_time'])}</td>
                    <td align="center">
                        <a target="_blank" href="{:u('Home/demo/training', array('id'=>$val['id']))}">查看</a> |
                        <a href="{:u('training/add', array('id'=>$val['id']))}">修改</a> |
                        <a href="javascript:void(0);" class="J_confirmurl" data-acttype="ajax" data-uri="{:U('training/delete', array('id'=>$val['id']))}" data-msg="确认删除 - {$val['title']}">删除</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <if condition="$Think.get.perpage gt 10">
            <div style="height: 60px;"></div>
        </if>
        <div class="btn_wrap_fixed">
            <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">全选/取消</label>
            <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('training/delete')}?ok=1" data-name="id" data-msg="确认删除" value="删除" />
            <div id="pages">{$page}</div>
        </div>
    </div>
</div>
<include file="Login:footer" />
</body>
</html>